﻿using UnityEngine;
using System.Collections;

public class Potato : MonoBehaviour {
	
	static public bool poteito;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		
		
	
	}
	
	
	void OnTriggerEnter (Collider other)
	{
		if(GameObject.FindGameObjectWithTag ("Player"))
		{
			poteito = true;
		}
		else
		{
			poteito = false;	
		}
	}
	
	
	void OnTriggerExit (Collider other)
	{
		/*if(GameObject.FindGameObjectWithTag ("Player"))
		{
			poteito = false;
		}*/
		poteito = false;
	}
}
